//inspired by www.dzone.com
$(function () {
	
		$("#moresubcategory1").click(function () {
			
			if($("#subcategory1").attr("loaded").indexOf("false")>=0){
				$.ajax({type:"GET", dataType:"html", url:"ajaxlisthotcategory.jsp", 
					success:function (html) {
						html = $.trim(html);
						if (html) $("#subcategory1").html(html);
					}, 
					complete:function () {
						//nothing to do
					}
				});
			}
						
			if($("#subcategory1").attr("style").indexOf("none")>0){
				$("#subcategory1").attr("style","display:inline");
			}else{
				$("#subcategory1").attr("style","display:none");
			}
			return false;
		});
	
		$("#moresubcategory2").click(function () {
			if($("#subcategory2").attr("style").indexOf("none")>0){
				$("#subcategory2").attr("style","display:inline");
			}else{
				$("#subcategory2").attr("style","display:none");
			}
		});
	
		$("#moresubcategory3").click(function () {
			if($("#subcategory3").attr("style").indexOf("none")>0){
				$("#subcategory3").attr("style","display:inline");
			}else{
				$("#subcategory3").attr("style","display:none");
			}
		});
	
 	
});